Optimal. Leaf size=169 \[ \frac {5 a^3 (3 A+4 C) \sin (c+d x)}{8 d}+\frac {(5 A+4 C) \sin (c+d x) \cos (c+d x) \left (a^3 \sec (c+d x)+a^3\right )}{8 d}+\frac {1}{8} a^3 x (15 A+28 C)+\frac {a^3 C \tanh ^{-1}(\sin (c+d x))}{d}+\frac {A \sin (c+d x) \cos ^2(c+d x) \left (a^2 \sec (c+d x)+a^2\right )^2}{4 a d}+\frac {A \sin (c+d x) \cos ^3(c+d x) (a \sec (c+d x)+a)^3}{4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.41, antiderivative size = 169, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.121, Rules used = {4087, 4017, 3996, 3770} \[ \frac {5 a^3 (3 A+4 C) \sin (c+d x)}{8 d}+\frac {(5 A+4 C) \sin (c+d x) \cos (c+d x) \left (a^3 \sec (c+d x)+a^3\right )}{8 d}+\frac {A \sin (c+d x) \cos ^2(c+d x) \left (a^2 \sec (c+d x)+a^2\right )^2}{4 a d}+\frac {1}{8} a^3 x (15 A+28 C)+\frac {a^3 C \tanh ^{-1}(\sin (c+d x))}{d}+\frac {A \sin (c+d x) \cos ^3(c+d x) (a \sec (c+d x)+a)^3}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3770
Rule 3996
Rule 4017
Rule 4087
Rubi steps
\begin {align*} \int \cos ^4(c+d x) (a+a \sec (c+d x))^3 \left (A+C \sec ^2(c+d x)\right ) \, dx &=\frac {A \cos ^3(c+d x) (a+a \sec (c+d x))^3 \sin (c+d x)}{4 d}+\frac {\int \cos ^3(c+d x) (a+a \sec (c+d x))^3 (3 a A+4 a C \sec (c+d x)) \, dx}{4 a}\\ &=\frac {A \cos ^3(c+d x) (a+a \sec (c+d x))^3 \sin (c+d x)}{4 d}+\frac {A \cos ^2(c+d x) \left (a^2+a^2 \sec (c+d x)\right )^2 \sin (c+d x)}{4 a d}+\frac {\int \cos ^2(c+d x) (a+a \sec (c+d x))^2 \left (3 a^2 (5 A+4 C)+12 a^2 C \sec (c+d x)\right ) \, dx}{12 a}\\ &=\frac {A \cos ^3(c+d x) (a+a \sec (c+d x))^3 \sin (c+d x)}{4 d}+\frac {A \cos ^2(c+d x) \left (a^2+a^2 \sec (c+d x)\right )^2 \sin (c+d x)}{4 a d}+\frac {(5 A+4 C) \cos (c+d x) \left (a^3+a^3 \sec (c+d x)\right ) \sin (c+d x)}{8 d}+\frac {\int \cos (c+d x) (a+a \sec (c+d x)) \left (15 a^3 (3 A+4 C)+24 a^3 C \sec (c+d x)\right ) \, dx}{24 a}\\ &=\frac {5 a^3 (3 A+4 C) \sin (c+d x)}{8 d}+\frac {A \cos ^3(c+d x) (a+a \sec (c+d x))^3 \sin (c+d x)}{4 d}+\frac {A \cos ^2(c+d x) \left (a^2+a^2 \sec (c+d x)\right )^2 \sin (c+d x)}{4 a d}+\frac {(5 A+4 C) \cos (c+d x) \left (a^3+a^3 \sec (c+d x)\right ) \sin (c+d x)}{8 d}-\frac {\int \left (-3 a^4 (15 A+28 C)-24 a^4 C \sec (c+d x)\right ) \, dx}{24 a}\\ &=\frac {1}{8} a^3 (15 A+28 C) x+\frac {5 a^3 (3 A+4 C) \sin (c+d x)}{8 d}+\frac {A \cos ^3(c+d x) (a+a \sec (c+d x))^3 \sin (c+d x)}{4 d}+\frac {A \cos ^2(c+d x) \left (a^2+a^2 \sec (c+d x)\right )^2 \sin (c+d x)}{4 a d}+\frac {(5 A+4 C) \cos (c+d x) \left (a^3+a^3 \sec (c+d x)\right ) \sin (c+d x)}{8 d}+\left (a^3 C\right ) \int \sec (c+d x) \, dx\\ &=\frac {1}{8} a^3 (15 A+28 C) x+\frac {a^3 C \tanh ^{-1}(\sin (c+d x))}{d}+\frac {5 a^3 (3 A+4 C) \sin (c+d x)}{8 d}+\frac {A \cos ^3(c+d x) (a+a \sec (c+d x))^3 \sin (c+d x)}{4 d}+\frac {A \cos ^2(c+d x) \left (a^2+a^2 \sec (c+d x)\right )^2 \sin (c+d x)}{4 a d}+\frac {(5 A+4 C) \cos (c+d x) \left (a^3+a^3 \sec (c+d x)\right ) \sin (c+d x)}{8 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.31, size = 124, normalized size = 0.73 \[ \frac {a^3 \left (8 (13 A+12 C) \sin (c+d x)+8 (4 A+C) \sin (2 (c+d x))+8 A \sin (3 (c+d x))+A \sin (4 (c+d x))+60 A d x-32 C \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+32 C \log \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )+112 C d x\right )}{32 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.48, size = 112, normalized size = 0.66 \[ \frac {{\left (15 \, A + 28 \, C\right )} a^{3} d x + 4 \, C a^{3} \log \left (\sin \left (d x + c\right ) + 1\right ) - 4 \, C a^{3} \log \left (-\sin \left (d x + c\right ) + 1\right ) + {\left (2 \, A a^{3} \cos \left (d x + c\right )^{3} + 8 \, A a^{3} \cos \left (d x + c\right )^{2} + {\left (15 \, A + 4 \, C\right )} a^{3} \cos \left (d x + c\right ) + 24 \, {\left (A + C\right )} a^{3}\right )} \sin \left (d x + c\right )}{8 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.34, size = 213, normalized size = 1.26 \[ \frac {8 \, C a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 8 \, C a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + {\left (15 \, A a^{3} + 28 \, C a^{3}\right )} {\left (d x + c\right )} + \frac {2 \, {\left (15 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 20 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 55 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 68 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 73 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 76 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 49 \, A a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 28 \, C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{4}}}{8 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 1.02, size = 175, normalized size = 1.04 \[ \frac {A \,a^{3} \sin \left (d x +c \right ) \left (\cos ^{3}\left (d x +c \right )\right )}{4 d}+\frac {15 A \,a^{3} \sin \left (d x +c \right ) \cos \left (d x +c \right )}{8 d}+\frac {15 a^{3} A x}{8}+\frac {15 A \,a^{3} c}{8 d}+\frac {C \,a^{3} \sin \left (d x +c \right ) \cos \left (d x +c \right )}{2 d}+\frac {7 a^{3} C x}{2}+\frac {7 C \,a^{3} c}{2 d}+\frac {A \left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right ) a^{3}}{d}+\frac {3 a^{3} A \sin \left (d x +c \right )}{d}+\frac {3 a^{3} C \sin \left (d x +c \right )}{d}+\frac {C \,a^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.35, size = 171, normalized size = 1.01 \[ -\frac {32 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} A a^{3} - {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} A a^{3} - 24 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} A a^{3} - 8 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} C a^{3} - 96 \, {\left (d x + c\right )} C a^{3} - 16 \, C a^{3} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 32 \, A a^{3} \sin \left (d x + c\right ) - 96 \, C a^{3} \sin \left (d x + c\right )}{32 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.85, size = 195, normalized size = 1.15 \[ \frac {13\,A\,a^3\,\sin \left (c+d\,x\right )}{4\,d}+\frac {3\,C\,a^3\,\sin \left (c+d\,x\right )}{d}+\frac {15\,A\,a^3\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{4\,d}+\frac {7\,C\,a^3\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,C\,a^3\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {A\,a^3\,\sin \left (2\,c+2\,d\,x\right )}{d}+\frac {A\,a^3\,\sin \left (3\,c+3\,d\,x\right )}{4\,d}+\frac {A\,a^3\,\sin \left (4\,c+4\,d\,x\right )}{32\,d}+\frac {C\,a^3\,\sin \left (2\,c+2\,d\,x\right )}{4\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________